import { NgModule } from '@angular/core';
import { DelonFormModule, WidgetRegistry } from '@delon/form';

// eslint-disable-next-line import/order
import { SharedModule } from '../shared.module';

// import { TinymceWidget } from './widgets/tinymce/tinymce.widget';
// import { UEditorWidget } from './widgets/ueditor/ueditor.widget';
import { ObjectTabsetWidget } from './widgets/object/object-tabset.widget';
import { TabsetItemWidget } from './widgets/tabset-item/tabset-item.widget';

export const SCHEMA_THIRDS_COMPONENTS = [
  // TinymceWidget,
  // UEditorWidget
  TabsetItemWidget,
  ObjectTabsetWidget
];

@NgModule({
  declarations: SCHEMA_THIRDS_COMPONENTS,
  imports: [SharedModule, DelonFormModule.forRoot()],
  exports: [...SCHEMA_THIRDS_COMPONENTS]
})
export class JsonSchemaModule {
  constructor(widgetRegistry: WidgetRegistry) {
    // widgetRegistry.register(TinymceWidget.KEY, TinymceWidget);
    // widgetRegistry.register(UEditorWidget.KEY, UEditorWidget);

    widgetRegistry.register(TabsetItemWidget.KEY, TabsetItemWidget);
    widgetRegistry.register(ObjectTabsetWidget.KEY, ObjectTabsetWidget);
  }
}
